/**
 * @filename:ContractDetail3DTO 2024-01-01 00:00:00
 * @project com/lwl/blue  V1.0
 * Copyright(c) 2024 <a href=mailto:lanwenliang@yidianlife.com>蓝文良</a> Co. Ltd.
 * All right reserved.
 */
package com.lwl.blue.dto;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>采购合同明细DTO</p>
 *
 * <p>说明： 用于采购合同明细数据封装</P>
 *
 * @version: V1.0
 * @author: <a href=mailto:lanwenliang@yidianlife.com>蓝文良</a>
 */
@Data
public class ContractDetail3DTO {
    
    @ApiModelProperty(name = "contractDetailId", value = "合同明细ID")
    private Long contractDetailId;
    
    @ApiModelProperty(name = "contractInnerId", value = "合同内码", required = true)
    @NotBlank(message = "合同内码不能为空")
    private String contractInnerId;
    
    @ApiModelProperty(name = "relatedOrderDetailId", value = "关联的订单明细ID")
    private Long relatedOrderDetailId;
    
    @ApiModelProperty(name = "prodId", value = "产品ID", required = true)
    @NotNull(message = "产品ID不能为空")
    private Integer prodId;
    
    @ApiModelProperty(name = "productName", value = "产品名称")
    private String productName;
    
    @ApiModelProperty(name = "productSpec", value = "产品规格")
    private String productSpec;
    
    @ApiModelProperty(name = "installmentNo", value = "分期批次号")
    private Integer installmentNo;
    
    @ApiModelProperty(name = "installmentExpectedDate", value = "本批次预计交货日期", required = true)
    @NotNull(message = "本批次预计交货日期不能为空")
    @JSONField(format = "yyyy-MM-dd")
    private Date installmentExpectedDate;
    
    @ApiModelProperty(name = "installmentQuantity", value = "本批次数量", required = true)
    @NotNull(message = "本批次数量不能为空")
    private Integer installmentQuantity;
    
    @ApiModelProperty(name = "installmentRatio", value = "本批次占比")
    private BigDecimal installmentRatio;
    
    @ApiModelProperty(name = "quantity", value = "总数量", required = true)
    @NotNull(message = "总数量不能为空")
    private Integer quantity;
    
    @ApiModelProperty(name = "unit", value = "单位", required = true)
    @NotBlank(message = "单位不能为空")
    private String unit;
    
    @ApiModelProperty(name = "unitPrice", value = "单价", required = true)
    @NotNull(message = "单价不能为空")
    private BigDecimal unitPrice;
    
    @ApiModelProperty(name = "subtotalAmount", value = "分项金额", required = true)
    @NotNull(message = "分项金额不能为空")
    private BigDecimal subtotalAmount;
    
    @ApiModelProperty(name = "taxFreeUnitPrice", value = "不含税单价", required = true)
    @NotNull(message = "不含税单价不能为空")
    private BigDecimal taxFreeUnitPrice;
    
    @ApiModelProperty(name = "taxFreeAmount", value = "不含税金额", required = true)
    @NotNull(message = "不含税金额不能为空")
    private BigDecimal taxFreeAmount;
    
    @ApiModelProperty(name = "taxRate", value = "税率", required = true)
    @NotNull(message = "税率不能为空")
    private BigDecimal taxRate;
    
    @ApiModelProperty(name = "taxAmount", value = "增值税金额", required = true)
    @NotNull(message = "增值税金额不能为空")
    private BigDecimal taxAmount;
    
    @ApiModelProperty(name = "deliveryTerms", value = "交期条款")
    private String deliveryTerms;
    
    @ApiModelProperty(name = "pickupPeriodStart", value = "本批次提货期限开始")
    @JSONField(format = "yyyy-MM-dd")
    private Date pickupPeriodStart;
    
    @ApiModelProperty(name = "pickupPeriodEnd", value = "本批次提货期限结束")
    @JSONField(format = "yyyy-MM-dd")
    private Date pickupPeriodEnd;
    
    @ApiModelProperty(name = "remark", value = "备注")
    private String remark;
    
    // 关联查询字段
    @ApiModelProperty(name = "itemName", value = "产品名称")
    private String itemName;
    
    @ApiModelProperty(name = "itemSpec", value = "产品规格")
    private String itemSpec;
}
